

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>list &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" />

  
  
    <link rel="shortcut icon" href="../../../_static/favicon.ico"/>
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/jquery.js"></script>
        <script src="../../../_static/underscore.js"></script>
        <script src="../../../_static/doctools.js"></script>
    
    <script type="text/javascript" src="../../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../../genindex/" />
    <link rel="search" title="Search" href="../../../search/" />
    <link rel="next" title="zap" href="../zap/" />
    <link rel="prev" title="systemd" href="../systemd/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../../" class="icon icon-home"></a> &raquo;</li>
        
          <li><a href="../../">ceph-volume</a> &raquo;</li>
        
      <li><code class="docutils literal notranslate"><span class="pre">list</span></code></li>
    
    
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../../../_sources/ceph-volume/lvm/list.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../../">
          

          
            
            <img src="../../../_static/logo.png" class="logo" alt="Logo"/>
          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../start/intro/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../">ceph-volume</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="../../#id2">迁移</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../../#id3">全新部署</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../../#osd">已有 OSD 怎么办</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="../../intro/">Overview</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../intro/#replacing-ceph-disk">Replacing <code class="docutils literal notranslate"><span class="pre">ceph-disk</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../../intro/#gpt-partitions-are-simple">GPT partitions are simple?</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../intro/#modularity">Modularity</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../intro/#ceph-volume-lvm"><code class="docutils literal notranslate"><span class="pre">ceph-volume</span> <span class="pre">lvm</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../../intro/#lvm-performance-penalty">LVM performance penalty</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../systemd/">systemd</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../inventory/"><code class="docutils literal notranslate"><span class="pre">inventory</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../../drive-group/"><code class="docutils literal notranslate"><span class="pre">drive-group</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../"><code class="docutils literal notranslate"><span class="pre">lvm</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../activate/"><code class="docutils literal notranslate"><span class="pre">activate</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../batch/"><code class="docutils literal notranslate"><span class="pre">batch</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../batch/#ceph-volume-lvm-batch-report">报表</a></li>
<li class="toctree-l4"><a class="reference internal" href="../batch/#sizing">Sizing</a></li>
<li class="toctree-l4"><a class="reference internal" href="../batch/#idempotency-and-disk-replacements">Idempotency and disk replacements</a></li>
<li class="toctree-l4"><a class="reference internal" href="../encryption/">加密</a></li>
<li class="toctree-l4"><a class="reference internal" href="../prepare/"><code class="docutils literal notranslate"><span class="pre">prepare</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../create/"><code class="docutils literal notranslate"><span class="pre">create</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../scan/">scan</a></li>
<li class="toctree-l4"><a class="reference internal" href="../systemd/">systemd</a></li>
<li class="toctree-l4 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">list</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../zap/"><code class="docutils literal notranslate"><span class="pre">zap</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../migrate/"><code class="docutils literal notranslate"><span class="pre">migrate</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../newdb/"><code class="docutils literal notranslate"><span class="pre">new-db</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../newwal/"><code class="docutils literal notranslate"><span class="pre">new-wal</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../../simple/"><code class="docutils literal notranslate"><span class="pre">simple</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../../simple/activate/"><code class="docutils literal notranslate"><span class="pre">activate</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../../simple/scan/"><code class="docutils literal notranslate"><span class="pre">scan</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../../simple/systemd/">systemd</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../zfs/"><code class="docutils literal notranslate"><span class="pre">zfs</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../../zfs/inventory/"><code class="docutils literal notranslate"><span class="pre">inventory</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <div class="section" id="list">
<span id="ceph-volume-lvm-list"></span><h1><code class="docutils literal notranslate"><span class="pre">list</span></code><a class="headerlink" href="#list" title="Permalink to this headline">¶</a></h1>
<p>This subcommand will list any devices (logical and physical) that may be
associated with a Ceph cluster, as long as they contain enough metadata to
allow for that discovery.</p>
<p>Output is grouped by the OSD ID associated with the devices, and unlike
<code class="docutils literal notranslate"><span class="pre">ceph-disk</span></code> it does not provide any information for devices that aren’t
associated with Ceph.</p>
<p>Command line options:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">--format</span></code> Allows a <code class="docutils literal notranslate"><span class="pre">json</span></code> or <code class="docutils literal notranslate"><span class="pre">pretty</span></code> value. Defaults to <code class="docutils literal notranslate"><span class="pre">pretty</span></code>
which will group the device information in a human-readable format.</p></li>
</ul>
<div class="section" id="full-reporting">
<h2>Full Reporting<a class="headerlink" href="#full-reporting" title="Permalink to this headline">¶</a></h2>
<p>When no positional arguments are used, a full reporting will be presented. This
means that all devices and logical volumes found in the system will be
displayed.</p>
<p>Full <code class="docutils literal notranslate"><span class="pre">pretty</span></code> reporting for two OSDs, one with a lv as a journal, and another
one with a physical device may look similar to:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># ceph-volume lvm list</span>


<span class="o">======</span> <span class="n">osd</span><span class="mf">.1</span> <span class="o">=======</span>

  <span class="p">[</span><span class="n">journal</span><span class="p">]</span>    <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">journals</span><span class="o">/</span><span class="n">journal1</span>

      <span class="n">journal</span> <span class="n">uuid</span>              <span class="n">C65n7d</span><span class="o">-</span><span class="n">B1gy</span><span class="o">-</span><span class="n">cqX3</span><span class="o">-</span><span class="n">vZKY</span><span class="o">-</span><span class="n">ZoE0</span><span class="o">-</span><span class="n">IEYM</span><span class="o">-</span><span class="n">HnIJzs</span>
      <span class="n">osd</span> <span class="nb">id</span>                    <span class="mi">1</span>
      <span class="n">cluster</span> <span class="n">fsid</span>              <span class="n">ce454d91</span><span class="o">-</span><span class="n">d748</span><span class="o">-</span><span class="mi">4751</span><span class="o">-</span><span class="n">a318</span><span class="o">-</span><span class="n">ff7f7aa18ffd</span>
      <span class="nb">type</span>                      <span class="n">journal</span>
      <span class="n">osd</span> <span class="n">fsid</span>                  <span class="mi">661</span><span class="n">b24f8</span><span class="o">-</span><span class="n">e062</span><span class="o">-</span><span class="mi">482</span><span class="n">b</span><span class="o">-</span><span class="mi">8110</span><span class="o">-</span><span class="mi">826</span><span class="n">ffe7f13fa</span>
      <span class="n">data</span> <span class="n">uuid</span>                 <span class="n">SlEgHe</span><span class="o">-</span><span class="n">jX1H</span><span class="o">-</span><span class="n">QBQk</span><span class="o">-</span><span class="n">Sce0</span><span class="o">-</span><span class="n">RUls</span><span class="o">-</span><span class="mi">8</span><span class="n">KlY</span><span class="o">-</span><span class="n">g8HgcZ</span>
      <span class="n">journal</span> <span class="n">device</span>            <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">journals</span><span class="o">/</span><span class="n">journal1</span>
      <span class="n">data</span> <span class="n">device</span>               <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">test_group</span><span class="o">/</span><span class="n">data</span><span class="o">-</span><span class="n">lv2</span>
      <span class="n">devices</span>                   <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">sda</span>

  <span class="p">[</span><span class="n">data</span><span class="p">]</span>    <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">test_group</span><span class="o">/</span><span class="n">data</span><span class="o">-</span><span class="n">lv2</span>

      <span class="n">journal</span> <span class="n">uuid</span>              <span class="n">C65n7d</span><span class="o">-</span><span class="n">B1gy</span><span class="o">-</span><span class="n">cqX3</span><span class="o">-</span><span class="n">vZKY</span><span class="o">-</span><span class="n">ZoE0</span><span class="o">-</span><span class="n">IEYM</span><span class="o">-</span><span class="n">HnIJzs</span>
      <span class="n">osd</span> <span class="nb">id</span>                    <span class="mi">1</span>
      <span class="n">cluster</span> <span class="n">fsid</span>              <span class="n">ce454d91</span><span class="o">-</span><span class="n">d748</span><span class="o">-</span><span class="mi">4751</span><span class="o">-</span><span class="n">a318</span><span class="o">-</span><span class="n">ff7f7aa18ffd</span>
      <span class="nb">type</span>                      <span class="n">data</span>
      <span class="n">osd</span> <span class="n">fsid</span>                  <span class="mi">661</span><span class="n">b24f8</span><span class="o">-</span><span class="n">e062</span><span class="o">-</span><span class="mi">482</span><span class="n">b</span><span class="o">-</span><span class="mi">8110</span><span class="o">-</span><span class="mi">826</span><span class="n">ffe7f13fa</span>
      <span class="n">data</span> <span class="n">uuid</span>                 <span class="n">SlEgHe</span><span class="o">-</span><span class="n">jX1H</span><span class="o">-</span><span class="n">QBQk</span><span class="o">-</span><span class="n">Sce0</span><span class="o">-</span><span class="n">RUls</span><span class="o">-</span><span class="mi">8</span><span class="n">KlY</span><span class="o">-</span><span class="n">g8HgcZ</span>
      <span class="n">journal</span> <span class="n">device</span>            <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">journals</span><span class="o">/</span><span class="n">journal1</span>
      <span class="n">data</span> <span class="n">device</span>               <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">test_group</span><span class="o">/</span><span class="n">data</span><span class="o">-</span><span class="n">lv2</span>
      <span class="n">devices</span>                   <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">sdb</span>

<span class="o">======</span> <span class="n">osd</span><span class="mf">.0</span> <span class="o">=======</span>

  <span class="p">[</span><span class="n">data</span><span class="p">]</span>    <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">test_group</span><span class="o">/</span><span class="n">data</span><span class="o">-</span><span class="n">lv1</span>

      <span class="n">journal</span> <span class="n">uuid</span>              <span class="n">cd72bd28</span><span class="o">-</span><span class="mi">002</span><span class="n">a</span><span class="o">-</span><span class="mi">48</span><span class="n">da</span><span class="o">-</span><span class="n">bdf6</span><span class="o">-</span><span class="n">d5b993e84f3f</span>
      <span class="n">osd</span> <span class="nb">id</span>                    <span class="mi">0</span>
      <span class="n">cluster</span> <span class="n">fsid</span>              <span class="n">ce454d91</span><span class="o">-</span><span class="n">d748</span><span class="o">-</span><span class="mi">4751</span><span class="o">-</span><span class="n">a318</span><span class="o">-</span><span class="n">ff7f7aa18ffd</span>
      <span class="nb">type</span>                      <span class="n">data</span>
      <span class="n">osd</span> <span class="n">fsid</span>                  <span class="mi">943949</span><span class="n">f0</span><span class="o">-</span><span class="n">ce37</span><span class="o">-</span><span class="mi">47</span><span class="n">ca</span><span class="o">-</span><span class="n">a33c</span><span class="o">-</span><span class="mi">3413</span><span class="n">d46ee9ec</span>
      <span class="n">data</span> <span class="n">uuid</span>                 <span class="n">TUpfel</span><span class="o">-</span><span class="n">Q5ZT</span><span class="o">-</span><span class="n">eFph</span><span class="o">-</span><span class="n">bdGW</span><span class="o">-</span><span class="n">SiNW</span><span class="o">-</span><span class="n">l0ag</span><span class="o">-</span><span class="n">f5kh00</span>
      <span class="n">journal</span> <span class="n">device</span>            <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">sdd1</span>
      <span class="n">data</span> <span class="n">device</span>               <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">test_group</span><span class="o">/</span><span class="n">data</span><span class="o">-</span><span class="n">lv1</span>
      <span class="n">devices</span>                   <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">sdc</span>

  <span class="p">[</span><span class="n">journal</span><span class="p">]</span>    <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">sdd1</span>

      <span class="n">PARTUUID</span>                  <span class="n">cd72bd28</span><span class="o">-</span><span class="mi">002</span><span class="n">a</span><span class="o">-</span><span class="mi">48</span><span class="n">da</span><span class="o">-</span><span class="n">bdf6</span><span class="o">-</span><span class="n">d5b993e84f3f</span>
</pre></div>
</div>
<p>For logical volumes the <code class="docutils literal notranslate"><span class="pre">devices</span></code> key is populated with the physical devices
associated with the logical volume. Since LVM allows multiple physical devices
to be part of a logical volume, the value will be comma separated when using
<code class="docutils literal notranslate"><span class="pre">pretty</span></code>, but an array when using <code class="docutils literal notranslate"><span class="pre">json</span></code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Tags are displayed in a readable format. The <code class="docutils literal notranslate"><span class="pre">osd</span> <span class="pre">id</span></code> key is stored
as a <code class="docutils literal notranslate"><span class="pre">ceph.osd_id</span></code> tag. For more information on lvm tag conventions
see <a class="reference internal" href="../../../dev/ceph-volume/lvm/#ceph-volume-lvm-tag-api"><span class="std std-ref">Tag API</span></a></p>
</div>
</div>
<div class="section" id="single-reporting">
<h2>Single Reporting<a class="headerlink" href="#single-reporting" title="Permalink to this headline">¶</a></h2>
<p>Single reporting can consume both devices and logical volumes as input
(positional parameters). For logical volumes, it is required to use the group
name as well as the logical volume name.</p>
<p>For example the <code class="docutils literal notranslate"><span class="pre">data-lv2</span></code> logical volume, in the <code class="docutils literal notranslate"><span class="pre">test_group</span></code> volume group
can be listed in the following way:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># ceph-volume lvm list test_group/data-lv2</span>


<span class="o">======</span> <span class="n">osd</span><span class="mf">.1</span> <span class="o">=======</span>

  <span class="p">[</span><span class="n">data</span><span class="p">]</span>    <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">test_group</span><span class="o">/</span><span class="n">data</span><span class="o">-</span><span class="n">lv2</span>

      <span class="n">journal</span> <span class="n">uuid</span>              <span class="n">C65n7d</span><span class="o">-</span><span class="n">B1gy</span><span class="o">-</span><span class="n">cqX3</span><span class="o">-</span><span class="n">vZKY</span><span class="o">-</span><span class="n">ZoE0</span><span class="o">-</span><span class="n">IEYM</span><span class="o">-</span><span class="n">HnIJzs</span>
      <span class="n">osd</span> <span class="nb">id</span>                    <span class="mi">1</span>
      <span class="n">cluster</span> <span class="n">fsid</span>              <span class="n">ce454d91</span><span class="o">-</span><span class="n">d748</span><span class="o">-</span><span class="mi">4751</span><span class="o">-</span><span class="n">a318</span><span class="o">-</span><span class="n">ff7f7aa18ffd</span>
      <span class="nb">type</span>                      <span class="n">data</span>
      <span class="n">osd</span> <span class="n">fsid</span>                  <span class="mi">661</span><span class="n">b24f8</span><span class="o">-</span><span class="n">e062</span><span class="o">-</span><span class="mi">482</span><span class="n">b</span><span class="o">-</span><span class="mi">8110</span><span class="o">-</span><span class="mi">826</span><span class="n">ffe7f13fa</span>
      <span class="n">data</span> <span class="n">uuid</span>                 <span class="n">SlEgHe</span><span class="o">-</span><span class="n">jX1H</span><span class="o">-</span><span class="n">QBQk</span><span class="o">-</span><span class="n">Sce0</span><span class="o">-</span><span class="n">RUls</span><span class="o">-</span><span class="mi">8</span><span class="n">KlY</span><span class="o">-</span><span class="n">g8HgcZ</span>
      <span class="n">journal</span> <span class="n">device</span>            <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">journals</span><span class="o">/</span><span class="n">journal1</span>
      <span class="n">data</span> <span class="n">device</span>               <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">test_group</span><span class="o">/</span><span class="n">data</span><span class="o">-</span><span class="n">lv2</span>
      <span class="n">devices</span>                   <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">sdc</span>
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Tags are displayed in a readable format. The <code class="docutils literal notranslate"><span class="pre">osd</span> <span class="pre">id</span></code> key is stored
as a <code class="docutils literal notranslate"><span class="pre">ceph.osd_id</span></code> tag. For more information on lvm tag conventions
see <a class="reference internal" href="../../../dev/ceph-volume/lvm/#ceph-volume-lvm-tag-api"><span class="std std-ref">Tag API</span></a></p>
</div>
<p>For plain disks, the full path to the device is required. For example, for
a device like <code class="docutils literal notranslate"><span class="pre">/dev/sdd1</span></code> it can look like:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># ceph-volume lvm list /dev/sdd1</span>


<span class="o">======</span> <span class="n">osd</span><span class="mf">.0</span> <span class="o">=======</span>

  <span class="p">[</span><span class="n">journal</span><span class="p">]</span>    <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">sdd1</span>

      <span class="n">PARTUUID</span>                  <span class="n">cd72bd28</span><span class="o">-</span><span class="mi">002</span><span class="n">a</span><span class="o">-</span><span class="mi">48</span><span class="n">da</span><span class="o">-</span><span class="n">bdf6</span><span class="o">-</span><span class="n">d5b993e84f3f</span>
</pre></div>
</div>
</div>
<div class="section" id="json">
<h2><code class="docutils literal notranslate"><span class="pre">json</span></code> 输出<a class="headerlink" href="#json" title="Permalink to this headline">¶</a></h2>
<p>All output using <code class="docutils literal notranslate"><span class="pre">--format=json</span></code> will show everything the system has stored
as metadata for the devices, including tags.</p>
<p>No changes for readability are done with <code class="docutils literal notranslate"><span class="pre">json</span></code> reporting, and all
information is presented as-is. Full output as well as single devices can be
listed.</p>
<p>For brevity, this is how a single logical volume would look with <code class="docutils literal notranslate"><span class="pre">json</span></code>
output (note how tags aren’t modified):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># ceph-volume lvm list --format=json test_group/data-lv1</span>
<span class="p">{</span>
    <span class="s2">&quot;0&quot;</span><span class="p">:</span> <span class="p">[</span>
        <span class="p">{</span>
            <span class="s2">&quot;devices&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;/dev/sda&quot;</span><span class="p">],</span>
            <span class="s2">&quot;lv_name&quot;</span><span class="p">:</span> <span class="s2">&quot;data-lv1&quot;</span><span class="p">,</span>
            <span class="s2">&quot;lv_path&quot;</span><span class="p">:</span> <span class="s2">&quot;/dev/test_group/data-lv1&quot;</span><span class="p">,</span>
            <span class="s2">&quot;lv_tags&quot;</span><span class="p">:</span> <span class="s2">&quot;ceph.cluster_fsid=ce454d91-d748-4751-a318-ff7f7aa18ffd,ceph.data_device=/dev/test_group/data-lv1,ceph.data_uuid=TUpfel-Q5ZT-eFph-bdGW-SiNW-l0ag-f5kh00,ceph.journal_device=/dev/sdd1,ceph.journal_uuid=cd72bd28-002a-48da-bdf6-d5b993e84f3f,ceph.osd_fsid=943949f0-ce37-47ca-a33c-3413d46ee9ec,ceph.osd_id=0,ceph.type=data&quot;</span><span class="p">,</span>
            <span class="s2">&quot;lv_uuid&quot;</span><span class="p">:</span> <span class="s2">&quot;TUpfel-Q5ZT-eFph-bdGW-SiNW-l0ag-f5kh00&quot;</span><span class="p">,</span>
            <span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;data-lv1&quot;</span><span class="p">,</span>
            <span class="s2">&quot;path&quot;</span><span class="p">:</span> <span class="s2">&quot;/dev/test_group/data-lv1&quot;</span><span class="p">,</span>
            <span class="s2">&quot;tags&quot;</span><span class="p">:</span> <span class="p">{</span>
                <span class="s2">&quot;ceph.cluster_fsid&quot;</span><span class="p">:</span> <span class="s2">&quot;ce454d91-d748-4751-a318-ff7f7aa18ffd&quot;</span><span class="p">,</span>
                <span class="s2">&quot;ceph.data_device&quot;</span><span class="p">:</span> <span class="s2">&quot;/dev/test_group/data-lv1&quot;</span><span class="p">,</span>
                <span class="s2">&quot;ceph.data_uuid&quot;</span><span class="p">:</span> <span class="s2">&quot;TUpfel-Q5ZT-eFph-bdGW-SiNW-l0ag-f5kh00&quot;</span><span class="p">,</span>
                <span class="s2">&quot;ceph.journal_device&quot;</span><span class="p">:</span> <span class="s2">&quot;/dev/sdd1&quot;</span><span class="p">,</span>
                <span class="s2">&quot;ceph.journal_uuid&quot;</span><span class="p">:</span> <span class="s2">&quot;cd72bd28-002a-48da-bdf6-d5b993e84f3f&quot;</span><span class="p">,</span>
                <span class="s2">&quot;ceph.osd_fsid&quot;</span><span class="p">:</span> <span class="s2">&quot;943949f0-ce37-47ca-a33c-3413d46ee9ec&quot;</span><span class="p">,</span>
                <span class="s2">&quot;ceph.osd_id&quot;</span><span class="p">:</span> <span class="s2">&quot;0&quot;</span><span class="p">,</span>
                <span class="s2">&quot;ceph.type&quot;</span><span class="p">:</span> <span class="s2">&quot;data&quot;</span>
            <span class="p">},</span>
            <span class="s2">&quot;type&quot;</span><span class="p">:</span> <span class="s2">&quot;data&quot;</span><span class="p">,</span>
            <span class="s2">&quot;vg_name&quot;</span><span class="p">:</span> <span class="s2">&quot;test_group&quot;</span>
        <span class="p">}</span>
    <span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="synchronized-information">
<h2>Synchronized information<a class="headerlink" href="#synchronized-information" title="Permalink to this headline">¶</a></h2>
<p>Before any listing type, the lvm API is queried to ensure that physical devices
that may be in use haven’t changed naming. It is possible that non-persistent
devices like <code class="docutils literal notranslate"><span class="pre">/dev/sda1</span></code> could change to <code class="docutils literal notranslate"><span class="pre">/dev/sdb1</span></code>.</p>
<p>The detection is possible because the <code class="docutils literal notranslate"><span class="pre">PARTUUID</span></code> is stored as part of the
metadata in the logical volume for the data lv. Even in the case of a journal
that is a physical device, this information is still stored on the data logical
volume associated with it.</p>
<p>If the name is no longer the same (as reported by <code class="docutils literal notranslate"><span class="pre">blkid</span></code> when using the
<code class="docutils literal notranslate"><span class="pre">PARTUUID</span></code>), the tag will get updated and the report will use the newly
refreshed information.</p>
</div>
</div>



           </div>
           
          </div>
          <footer>
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
        <a href="../zap/" class="btn btn-neutral float-right" title="zap" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
        <a href="../systemd/" class="btn btn-neutral float-left" title="systemd" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).

    </p>
  </div> 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>